package cc.rengu.redp.bizimpl.upmp.service;

import cc.rengu.redp.bizimpl.upmp.domain.BBaseProdInfo;
import cc.rengu.redp.bizimpl.upmp.domain.ProfitConfInfo;
import cc.rengu.redp.bizimpl.upmp.domain.UpmpBPlatMchntInfo;
import cc.rengu.redp.bizimpl.upmp.vo.OperationResult;
import cc.rengu.redp.common.domain.QueryRequest;
import cc.rengu.redp.common.exception.RedpException;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.transaction.annotation.Transactional;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

/**
 * @author 刘玉亮.LL
 */
public interface IUpmpBPlatMchntInfoService extends IService<UpmpBPlatMchntInfo> {

    IPage<UpmpBPlatMchntInfo> findByPage(QueryRequest request, UpmpBPlatMchntInfo info);

    UpmpBPlatMchntInfo findOneByCode(String platMchntNo, String status, String instId);

    Map<BBaseProdInfo, List<ProfitConfInfo>> getProfitConfInfoList() throws RedpException;

    String genProfitPrimaryKey(ProfitConfInfo profitConfInfo);

    @Transactional(value = "transactionManager")
    OperationResult saveData(String menuId, String oprMenuName, UpmpBPlatMchntInfo entity, HttpServletRequest request, String webNextUrl) throws RedpException;

    @Transactional(value = "transactionManager")
    OperationResult chkData(String menuId, String oprMenuName, UpmpBPlatMchntInfo entity, HttpServletRequest request, String webNextUrl) throws RedpException;
}
